package com.dhgate.pic.craw.spider;

import com.dhgate.pic.craw.pageProcessor.ImgProcessor;
import com.dhgate.pic.craw.pipeline.ImgPipeline;

import us.codecraft.webmagic.Spider;


public class ImgSpider {

    public static void main(String[] args){

        String fileStorePath = "D:\\webmagic-lib\\data\\imgNew7\\";
        String urlPattern = "http://www.meizitu.com/[a-z]/[0-9]{1,4}.html";
        ImgProcessor imgspider=new ImgProcessor("http://www.meizitu.com/",urlPattern);

        Spider.create(imgspider)
                .addUrl("http://www.meizitu.com/")
                .addPipeline(new ImgPipeline(fileStorePath))
                .thread(10)       
                .run();
    }
}